package com.stu.spring.context.chapter10.tran;

import org.springframework.jdbc.core.RowMapper;

import java.sql.ResultSet;
import java.sql.SQLException;

public class MyBookMapper implements RowMapper {
	@Override
	public Object mapRow(ResultSet rs, int rowNum) throws SQLException {
		MyBook myBook = new MyBook(rs.getLong("id"), rs.getString("name"),
				rs.getInt("price"), rs.getString("note"));
		return myBook;
	}
}
